﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

/// <summary>
/// Summary description for CategoryBus
/// </summary>
public class CategoryBus
{
    CategoryDAL CDAL = new CategoryDAL();

    public CategoryBus()
    {
        //
        // TODO: Add constructor logic here
        //
    }

    public DataTable GetAllCategory()
    {
        return CDAL.GetAllCategory();
    }
    public bool UpdateCategory(Category objCategory)
    {
        if (CDAL.UpdateCategoty(objCategory))
            return true;
        else
            return false;
    }
    public bool AddCategory(Category objCategory)
    {
        if (CDAL.AddCategoty(objCategory))
            return true;
        else
            return false;
    }
    public bool DeleteCategory(int catID)
    {
        return CDAL.DeleteCategory(catID);
    }
}
